package com.totcy.constant;

import net.sf.json.JSONObject;

/**
 * 响应结果封装
 */
public class CommonMethod {

    public static JSONObject responseResult(CommonConstant.ErrorCode code, JSONObject data) {

        JSONObject result = new JSONObject();
        result.put("code", code.getCode());
        result.put("message", code.getError());
        result.put("data", data);

        return result;
    }
}
